<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <div></div>

</body>

</html>
<script>
    // location.search 获取页面的参数
    //http://www.baidu.com?name='zs'&pwd='123456'

    console.log(location.search); //?uname=echo
    var str = location.search.slice(1); //uname=echo
    var arr = str.split('=');
    console.log(arr); //['uname', 'echo']

    var div = document.querySelector('div');
    div.innerHTML = '欢迎您' + arr[1];
</script>